/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-11-30     Administrator       the first version
 */
#ifndef HARDWARE_KEY_CHECK_H_
#define HARDWARE_KEY_CHECK_H_

#include <key_board.h>
#include <key_board_sample.h>
#include <stdio.h>
#include <rtthread.h>
//按键检测
void KEY_CHECK(void);
//组合事件注册
void register_event(void);
//急停按键弹起检测
void EmergencyStop_Check(void);
//光电传感器状态检测
void PhotoElectricity_Check (void);


//按键标志位结构体
typedef struct KeyFlag
{
    rt_uint8_t key_up_f;
    rt_uint8_t Key_down_f;
    rt_uint8_t Key_set_f;
    rt_uint8_t Key_switch_f;
    rt_uint8_t key_up_data;
    rt_uint8_t Key_down_data;
    rt_uint8_t Key_set_data;
    rt_uint8_t Key_switch_data;
}KeyFlag_t;


//按键标志结构体
extern KeyFlag_t KeyFlag;

#endif /* HARDWARE_KEY_CHECK_H_ */
